<?php

/**
 * Get version of module
 *
 * @category   Magestore
 * @package    Magestore_Mageconnector
 * @author     Nguyen Minh Dung (http://oss.com.vn)
 */
class Magestore_Mageconnector_Model_Information {

    private static $config = null;

    public function getConfig() {
        if (is_null(self::$config)) {
            self::$config = simplexml_load_file(
                        Mage::getBaseDir() . DS . 'app' . DS . 'code' . DS . 'local' . DS . 'Magestore' . DS . 'Mageconnector' . DS . 'etc' . DS . 'config.xml'
                    );
        }

        return self::$config;
    }

    public function getVersion() {
        return $this->getConfig()->modules->Magestore_Mageconnector->version;
    }

}